feat(attributes-order): add ignoreVBindObject option#3012
feat(attributes-order): add ignoreVBindObject option#3012
ignoreVBindObject option#3012Conversation
🦋 Changeset detectedLatest commit: e6f5067 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
This PR adds a new ignoreVBindObject option to the vue/attributes-order rule, allowing developers to exclude v-bind="object" (spread binding) from attribute order checking. This addresses use cases where spread binding must be positioned strategically to control event handler execution order in Vue components.
Changes:
- Added
ignoreVBindObjectboolean option to rule schema with default valuefalse - Implemented filtering logic to exclude
v-bind="object"from ordering checks when option is enabled - Fixed minor typo in comment (removed extra space in
v-bind ="object")
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
lib/rules/attributes-order.js |
Added option parsing, filtering logic, schema definition, and fixed comment typo |
tests/lib/rules/attributes-order.js |
Added 2 valid test cases and 2 invalid test cases to verify option behavior |
docs/rules/attributes-order.md |
Added documentation section explaining the new option with example |
.changeset/dark-cars-shake.md |
Added changeset for minor version bump |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
FloEdelmann
left a comment
There was a problem hiding this comment.
Looks good to me, thank you!
| @@ -0,0 +1,5 @@ | |||
| --- | |||
| 'eslint-plugin-vue': minor | |||
There was a problem hiding this comment.
Please don't merge this yet, I'd like to release a patch version first.
Resolve #2999
Currently,
v-bind="object"is only excluded from sorting checks when adjacent toATTR_DYNAMIC.Propose adding a new boolean option,
ignoreVBindObject, to allow developers to globally excludev-bind="object"from sorting checks, regardless of its position(skipped both nearATTR_DYNAMICandEVENT).